<?php
/**
 * Created by PhpStorm.
 * User: QK
 * Date: 2018-07-25
 * Time: 上午 10:21
 */
namespace app\blog\controller;
use cmf\controller\AdminBaseController;
use app\blog\model\CountsModel as cos;
class CountsController extends AdminBaseController{
    /**
     * 卖出商品单个统计统计
    */
    public function _initialize()
    {
        parent::_initialize();
        $this->cos =new cos();
    }

    public function indexs(){

    }
    public function index(){
        $array=$this->request->param();
        /*商品总计*/
        if(isset($array['order_by']))
        {
            $order_by=$array['order_by'];
        }else{
            $order_by=0;
        }
        $data=$this->cos->index($array);
        $this->assign('order_by',$order_by);
        $this->assign('data',$data['data']);
        $this->assign('page',$data['page']);
        return $this->fetch('counts/index');
    }

}